package jemuillot.BiohazardPanelPuzzle;

import org.anddev.andengine.entity.scene.Scene;
import org.anddev.andengine.entity.shape.RectangularShape;
import org.anddev.andengine.opengl.texture.region.BaseTextureRegion;

import android.view.KeyEvent;

public class BiohazardPanelPuzzleScene implements BiohazardPanelPuzzleConsts {

	protected Scene scene;
	protected BiohazardPanelPuzzle bpp;
	
	protected String getString(int strId) {
		return bpp.getString(strId);
	}


	protected float getCenterX(BaseTextureRegion tr) {
		return (CAMERA_WIDTH - tr.getWidth()) / 2;
	}

	protected float getCenterY(BaseTextureRegion tr) {
		return (CAMERA_HEIGHT - tr.getHeight()) / 2;
	}

	protected float getDividedCenterX(RectangularShape tr, int div, int index) {
		return (CAMERA_WIDTH / div - tr.getWidth()) / 2 + (index - 1)
				* CAMERA_WIDTH / div;
	}

	protected float getCenterX(RectangularShape tr) {
		return (CAMERA_WIDTH - tr.getWidth()) / 2;
	}

	protected float getCenterY(RectangularShape tr) {
		return (CAMERA_HEIGHT - tr.getHeight()) / 2;
	}

	public BiohazardPanelPuzzleScene(BiohazardPanelPuzzle bpp, int layers) {
		this.bpp = bpp;
		scene = new Scene(layers);
		bpp.getEngine().setScene(scene);
		bpp.gameScene = this;
	}

	public Scene getScene() {
		return scene;
	}

	public void onResumed() {
	}

	public void onPaused() {
	}

	public boolean onKeyDown(int keyCode, KeyEvent event) {
		return false;
	}

	public boolean onKeyUp(int keyCode, KeyEvent event) {
		return false;
	}

}
